package com.example.sourcesprng.jdk8._lambda;

public class UseLambda {

    public void useAnimalLambda(Animal animal) {
        System.out.println("UseLambda.useLambda() Start =====");
        animal.eat();
        System.out.println("UseLambda.useLambda() End =====");
    }

//    public void userSwimLambda(String[] names, ISwim swim){
//        swim.swimming(names);
//    }

    public void userSwimLambda(String name, ISwim swim){
        swim.swimming(name);
    }

//    public void userSwimLambda(String name, int age, ISwim swim){
//        swim.swimming(name, age);
//    }

//    public void userSwimLambda(ISwim swim){
//        String name = "小红";
//        int age = 28;
//        swim.swimming(name, age);
//    }
}
